﻿using System.Text;

namespace Core.File {
    public class StringUtils {
        private const string cSplitString = "_,_";
        private static readonly StringBuilder rsBuilder = new StringBuilder();
        public static string Combine(params string[] strs) {
            rsBuilder.Clear();
            for (int i = 0; i < strs.Length - 1; ++i) {
                rsBuilder.Append(strs[i]);
                rsBuilder.Append(cSplitString);
            }

            if (strs.Length - 1 >= 0) {
                rsBuilder.Append(strs[strs.Length - 1]);   
            }
            return rsBuilder.ToString();
        }

        public static string[] Split(string data) {
            return data.Split(cSplitString);
        }
    }
}